import { pubRequire } from '@utils/public'
const baseUrl = '/app-guides'
// 获取列表
export function getGuidanceList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callBack, errBack)
}
// APP引导页新增
export function addGuidance(obj, callBack, errBack) {
  return pubRequire('post', `${baseUrl}`, obj, callBack, errBack)
}
// 根据id获取编辑页详情
export function getEditGuidance(id, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/${id}`, '', callBack, errBack)
}
// App引导页修改
export function editGuidance(id, obj, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}`, obj, callBack, errBack)
}
// 删除单个
export function delGuidance(id, callBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${id}`, '', callBack, errBack)
}
// 启用引导页
export function putEnable(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/open`, '', callBack, errBack)
}
// 关闭引导页
export function putDisable(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/close`, '', callBack, errBack)
}
